﻿@{
    ViewBag.Title = "Details"; 
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    layui.use(['jquery', 'form', 'laydate', 'common'], function () {
        var form = layui.form,
            $ = layui.$,
            common = layui.common,
            laydate = layui.laydate;
        var keyValue = $.request("keyValue");
        //权限字段
        common.authorizeFields('adminform');
        //此处需修改
        //类型为时间时
        //laydate.render({
            //elem: '#F_Birthday'
            //, btns: ['clear', 'now']
            //, trigger: 'click',
            //format: 'yyyy-MM-dd',
        //});

        $(function () {
            initControl();
            common.ajax({
                url: '/EquipmentManage/EqpRepair/GetFormJson',
                dataType: 'json',
                data: { keyValue: keyValue },
                async: false,
                success: function (data) {
                    common.val('adminform', data);
                    common.setReadOnly('adminform');
                    form.render();
                 }
            });
       });
       wcLoading.close();

       function initControl() {
           layui.$('#F_EqpId').bindSelect({
               url: "/EquipmentManage/EqpPqcCheckItem/GetEqpListJson",
               id: "F_Id",
               text: "F_EqpName"
           });

           layui.$('#F_ConfirmMan').bindSelect({
               url: "/EquipmentManage/EqpRepair/GetUserListJson",
               id: "F_Id",
               text: "F_RealName"
           });

           layui.$('#F_CallRepairMan').bindSelect({
               url: "/EquipmentManage/EqpRepair/GetUserListJson",
               id: "F_Id",
               text: "F_RealName"
           });
       }
   });
</script>

<body>
    <div class="layuimini-container">
        <div class="layuimini-main">
            <div class="layui-form layuimini-form" lay-filter="adminform">
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">维修单号</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_RepairNo" name="F_RepairNo" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">工位</label>
                    <div class="layui-input-block">
                        <select id="F_EqpId" name="F_EqpId" lay-filter="splitType" lay-search lay-verify="required">
                            <option value="" selected>请选择</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">故障分类</label>
                    <div class="layui-input-block">
                        <select id="F_ProblemType" name="F_ProblemType" lay-search>
                            <option value="" selected>请选择</option>
                            <option value="1">人</option>
                            <option value="2">机</option>
                            <option value="3">料</option>
                            <option value="4">法</option>
                            <option value="5">环</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">故障等级</label>
                    <div class="layui-input-block">
                        <select id="F_ProblemClass" name="F_ProblemClass" lay-search>
                            <option value="" selected>请选择</option>
                            <option value="1">低</option>
                            <option value="2">中</option>
                            <option value="3">高</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">故障描述</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_ProblemDesc" name="F_ProblemDesc" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">故障图片路径</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_PhotoPath" name="F_PhotoPath" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">报修人ID</label>
                    <div class="layui-input-block">
                        <select id="F_CallRepairMan" name="F_CallRepairMan" lay-verify="required" lay-search lay-filter="CallRepairMan">

                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">报修时间</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_CallRepairTime" name="F_CallRepairTime" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">派工时间</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_DistributeTime" name="F_DistributeTime" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">维修开始时间</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_StartRepairTime" name="F_StartRepairTime" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">维修结束时间</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_EndRepairTime" name="F_EndRepairTime" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">状态</label>
                    <div class="layui-input-block">
                        <select id="F_Status" name="F_Status" lay-search disabled>
                            <option value="">请选择</option>
                            <option value="1" selected>报修</option>
                            <option value="2">已派工</option>
                            <option value="3">维修中</option>
                            <option value="4">确认</option>
                            <option value="5">关闭</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">确认人</label>
                    <div class="layui-input-block">
                        <select id="F_ConfirmMan" name="F_ConfirmMan" lay-verify="required" lay-search lay-filter="ConfirmMan">
                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">确认时间</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_ConfirmTime" name="F_ConfirmTime" lay-verify="required" class="layui-input">
                    </div>
                </div>
                @*<div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">F_EnabledMark</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_EnabledMark" name="F_EnabledMark" lay-verify="required" class="layui-input">
                    </div>
                </div>*@
                @*<div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">备注</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_Description" name="F_Description" lay-verify="required" class="layui-input">
                    </div>
                </div>*@
                @*<div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">F_CreatorTime</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_CreatorTime" name="F_CreatorTime" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">F_CreatorUserId</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_CreatorUserId" name="F_CreatorUserId" lay-verify="required" class="layui-input">
                    </div>
                </div>*@
            </div>
        </div>
    </div>
</body>

